﻿// -----------------------------------------------------------------------
// <copyright file="AlwaysFailingSyncCommandHandler..cs">
// Copyright (c) 2013 Andrey Veselov. All rights reserved.
// License:  Microsoft Public License (MS-PL)
// Contacts: http://andrey.moveax.com  andrey@moveax.com
// </copyright>
// -----------------------------------------------------------------------

namespace Moveax.DataAccess.Cqrs.Highway.UnitTests.DataAccess.CommandHandlers
{
    using System;
    using System.Diagnostics.Contracts;
    using Moveax.DataAccess.Cqrs.Highway.UnitTests.Model.Commands;

    internal class AlwaysFailingSyncCommandHandler : ICommandHandlerSync<AlwaysFailingSyncCommand>
    {
        public AlwaysFailingSyncCommandHandler(IRepository repository)
        {
            Contract.Requires(repository != null);
        }

        public void Execute(AlwaysFailingSyncCommand command)
        {
            throw new Exception("This is AlwaysFailingAsyncCommand");
        }
    }
}